import request from "@/utils/request";

// 导出单位
export function aexportCompany(query) {
  return request({
    url: `/backAdmin/companyApi/company/export?query=${query}`,
    method: "post",
  });
}

// 新增单位
export function addCompany(data) {
  return request({
    url: `/backAdmin/companyApi/company/add`,
    method: "post",
    data: data,
  });
}
// 删除单位
export function delCompany(merchantIdList) {
  return request({
    url: `/backAdmin/companyApi/company/delete?merchantIdList=${merchantIdList}`,
    method: "post",
  });
}

// 查询单位详细
export function getCompany(companyId) {
  return request({
    url: `/backAdmin/companyApi/company/detail?merchantId=${companyId}`,
    method: "get",
  });
}
// 查询单位列表
export function listCompany(query) {
  return request({
    url: "/backAdmin/companyApi/company/list",
    method: "get",
    params: query,
  });
}

// 修改单位
export function updateCompany(data) {
  return request({
    url: "/backAdmin/companyApi/company/update",
    method: "post",
    data: data,
  });
}
